<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    var o = {
      name: 'zs'
    }

    var arr = ['a', 'b', 'c']

    function Student(name) {
      this.name = name
    }

    var s = new Student('ls')

    // 函数其实也是 对象
    function getMax() {}

    console.log(o.toString()) // toString方法是Object构造函数的原型对象方法
    console.log(s.toString())

    // Object原型的toString方法类似于兜底效果,实在找不到了就用Object的toString

    // 因为数组的原型对象里有 toString() 方法
    // 重写 (子类和父类的方法名一样, 使用时优先用子类)
    console.log(arr.toString())
    console.log(getMax.toString())


  </script>
</body>

</html>